package com.example.e11_q3;

/**
 * @desc:
 * @author: Shoko
 * @date: 2025/6/13
 */
import java.util.ArrayList;
import java.util.List;

public class RegularEmployee implements Employee {
    // 实际工作时长（小时）
    private int actualHours;
    // 部门
    private String department;
    // 基本工资（元/周）
    private int baseSalary;
    // 请假时长（小时，<0 表示加班）
    private int leaveHours;

    public RegularEmployee(int actualHours, String department, int baseSalary) {
        this.actualHours = actualHours;
        this.department = department;
        this.baseSalary = baseSalary;
        // 计算请假/加班时长
        this.leaveHours = 40 - actualHours;
    }

    @Override
    public void accept(EmployeeVisitor visitor) {
        visitor.visit(this); // 触发访问者的具体方法
    }

    // Getter
    public int getActualHours() {
        return actualHours;
    }

    public String getDepartment() {
        return department;
    }

    public int getBaseSalary() {
        return baseSalary;
    }

    public int getLeaveHours() {
        return leaveHours;
    }
}
